Add file missing from SVN, from the tarball.
authorTor Lillqvist <tml@novell.com>
Fri, 22 Feb 2008 20:17:00 +0000 (20:17 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Fri, 22 Feb 2008 20:17:00 +0000 (20:17 +0000)
2008-02-22  Tor Lillqvist  <tml@novell.com>

* tests/pixbuf-init.c: Add file missing from SVN, from the tarball.

svn path=/trunk/; revision=19634

ChangeLog
tests/pixbuf-init.c [new file with mode: 0644]

index e7121ced4fc6b63fcca052c61396a3094e6a82c3..630d4b70f69c1e217716cb9502677e9ac24e00b6 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-02-22  Tor Lillqvist  <tml@novell.com>
+
+       * tests/pixbuf-init.c: Add file missing from SVN, from the tarball.
+
 2008-02-22  Dominic Lachowicz  <domlachowicz@gmail.com>
 
        * gdk-pixbuf/queryloaders.c (loader_sanity_check): It's perfectly acceptable
diff --git a/tests/pixbuf-init.c b/tests/pixbuf-init.c
new file mode 100644 (file)
index 0000000..f4faa9a
--- /dev/null
@@ -0,0 +1,20 @@
+#include <config.h>
+#include <glib.h>
+
+#include <sys/stat.h>
+#include <stdlib.h>
+
+static gboolean
+file_exists (const char *filename)
+{
+  struct stat statbuf;
+
+  return stat (filename, &statbuf) == 0;
+}
+
+void
+pixbuf_init (void)
+{
+  if (file_exists ("../gdk-pixbuf/libpixbufloader-pnm.la"))
+    g_setenv ("GDK_PIXBUF_MODULE_FILE", "../gdk-pixbuf/gdk-pixbuf.loaders", TRUE);
+}